import request from "../request/index";

const baseUrl = process.env.VUE_APP_BASE_URL;

export function GetMenuTree() {
  return request.get(`${baseUrl}/Menu/GetMenuTree`);
}

export function GetMenu(id) {
  return request.get(`${baseUrl}/Menu/GetMenu?id=${id}`);
}

export function DeleteMenu(menu) {
  return request.post(`${baseUrl}/Menu/DeleteMenu`, menu);
}

export function UpdateMenu(menu) {
  return request.post(`${baseUrl}/Menu/UpdateMenu`, menu);
}

export function AddMenu(menu) {
  return request.post(`${baseUrl}/Menu/AddMenu`, menu);
}
